package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.domain.UmsMemberLevel;
import com.itheima.mapper.UmsMemberLevelMapper;
import com.itheima.service.UmsMemberLevelService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 会员等级表 服务实现类
 * </p>
 *
 * @author zhuguo
 * @since 2022-11-10
 */

@DubboService
public class UmsMemberLevelServiceImpl extends ServiceImpl<UmsMemberLevelMapper, UmsMemberLevel> implements UmsMemberLevelService {

    @Autowired
    private UmsMemberLevelMapper memberLevelMapper;
    @Override
    public List<UmsMemberLevel> list(Integer defaultStatus) {
        LambdaQueryWrapper<UmsMemberLevel> lqw = new LambdaQueryWrapper<>();
        lqw.eq(UmsMemberLevel::getDefaultStatus, defaultStatus);
        return memberLevelMapper.selectList(lqw);
    }
}
